package com.steam.sys.domain;

import com.steam.basic.domain.BaseDomain;

import java.util.ArrayList;
import java.util.List;

/**
 * 实体类：
 */
public class Role extends BaseDomain{

    private String name;
    private String sn;
    // 角色和权限 多对多关系：当前角色拥有的权限 - 接收前端传递的权限数据
    private List<Long> permissions = new ArrayList<Long>();
    // 角色和菜单 多对多关系：当前角色拥有的菜单 - 接收前端传递的菜单数据
    private List<Long> menus = new ArrayList<Long>();
    //@TODO 以后做菜单回显可以加这个参数
    private List<Menu> ownMenus = new ArrayList<>();

    public List<Long> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<Long> permissions) {
        this.permissions = permissions;
    }

    public List<Long> getMenus() {
        return menus;
    }

    public void setMenus(List<Long> menus) {
        this.menus = menus;
    }

    public List<Menu> getOwnMenus() {
        return ownMenus;
    }

    public void setOwnMenus(List<Menu> ownMenus) {
        this.ownMenus = ownMenus;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    @Override
    public String toString() {
        return "Role{" +
                "name='" + name + '\'' +
                ", sn='" + sn + '\'' +
                ", permissions=" + permissions +
                ", menus=" + menus +
                ", ownMenus=" + ownMenus +
                '}';
    }
}
